ByteIO
 
Component ByteIO
General Byte Input/Output (8 bits)
Component Level: High
Typical Usage:
(Examples of a typical usage of the component in user code. For more information please see the page Component Code Typical Usage.)

Required component name is "Byte1".
Examples of typical usage of this component follow:

(1)
The direction of the component is set to input.

 MAIN.C

void main(void)
{
  /* Wait until "10101010" is on the port */
  while( Byte1_GetVal() != 0xAA );
    :
}

(2)
The direction of the component is set to output.

 MAIN.C

void main(void)
{
  Byte1_PutVal(0xAA);  // "10101010" is on the port
  
  for (;;) {
  /* Invert output level of fourth pin on the port */
    Byte1_NegBit(3);
  }
}

(3)
The direction of the component is set to input/output.

 MAIN.C

void main(void)
{
  Byte1_SetDir(FALSE);  // Set input mode

  /* Wait until "11111111" is on the port */
  while( Byte1_GetVal() != 0xFF );
  
  Byte1_SetDir(TRUE);   // Set output mode

  Byte1_PutVal(0);      // Set "00000000" on the port
}